package pkj.no.notetab.gui;

import javax.swing.*;
import java.awt.*;


public class Screen extends JFrame{

	private String title;
	
	public Screen(String title){
		this.title = title;
		
		setTitle(title);
		// Set icon on the frame.
		this.setIconImage(Toolkit.getDefaultToolkit().getImage("res/icon.png"));
		
		
		// Bordered layout! NORTH, WEST, SOUTH , EAST!
		setLayout(new BorderLayout());
		
		// Do nothing on close, we handle this in our ScreenListener class.
		setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);

		// Full screen.
		Dimension di = Toolkit.getDefaultToolkit().getScreenSize();
		this.setSize(di);

		
		Tabs tabs = new Tabs();
		tabs.setTabs();
		TopMenu topMenu = new TopMenu(tabs);
		
		addWindowListener(new ScreenListener(tabs));
		
		
		add(topMenu, BorderLayout.NORTH);
		
		add(tabs, BorderLayout.CENTER);
		
		
		
		
	}
	
	
	
	
	
	
}
